GenerativeComponents Help

Constructors

Objects need to be constructed and initialized in order to be usable in a scripting and programming environment. The first step is to define the a variable of the type of the object that is to be created. Once the variable is defined one can call the constructor to create the object itself. A line would look like this then.

Point pt = new Point();

Usually the default constructor is the Type name followed by parenthesis. There are different forms of constructor methods depending on whether one passes arguments to the constructor or not. For instance to make an object a child in GenerativeComponents one can pass the keyword this as an input argument to the constructor.

Point pt = new Point(this);

All constructor methods of a Node are listed in the Node Types tab of the Expression Builder dialog.

Once an object has been constructed it still needs to be initialized to populate its properties and give it a non null value.

Just below the constructor methods are the initialization methods or update methods. The next step after constructing an object is to initialize it usually. This populates the properties of an objects with the values passed in as input values when the update methods is called.